home *** CD-ROM | disk | FTP | other *** search
/ PC World 2008 April / PCWorld_2008-04_cd.bin / komercni software / miton / SystemMechanic7Pro.exe / {app} / smhtml.dll / 1033 / HTML / IMAGE.JS < prev    next >
Text File  |  2008-01-24  |  1KB  |  63 lines

  1. function Image()
  2. {
  3.   this.ID = "";
  4.   this.src = "";
  5.   this.ImageHoversrc = "";
  6.   this.Align = "absmiddle";
  7.   
  8.   this.Render = __RenderImage;
  9.   
  10.   this.ChangeImage = __ChangeImage;
  11.   
  12.   this.HoverOn = __HoverOnActionButton;
  13.   this.HoverOff = __HoverOffActionButton;
  14.  
  15.   this._Rendered = false;
  16. }
  17.  
  18.  
  19. function __RenderImage()
  20. {
  21.    var content = "";
  22.   if (this._Rendered)
  23.     return "";
  24.     //onmouseover="this.src='managepolicies-hover.gif'"  onmouseout="this.src='managepolicies.gif'" 
  25.     
  26.    var mouseout = "";
  27.    var mouseover = "";
  28.    
  29.    if( this.ImageHoversrc != "")
  30.    {
  31.      mouseout = "onmouseout=\"this.src='"+ this.src +"'\" ";
  32.      mouseover = "onmouseover=\"this.src='"+ this.ImageHoversrc +"'\" ";
  33.    }
  34.     
  35.   content += "<img id=\"image_" + this.ID + "\" src="+this.src+" "+mouseout+" "+mouseover+"  align=" + this.Align + " >";
  36.  
  37.   
  38.   this._Rendered = true;
  39.   
  40.   return content;
  41. }
  42.  
  43.  
  44. function __ChangeImage()
  45. {
  46.   var img = Get("image_" + this.ID);
  47.   img.src = this.src;
  48. }
  49.  
  50.  
  51. function __HoverOnActionButton()
  52. {
  53.   var img = Get("image_" + this.ID);
  54.   img.src = this.ImageHoversrc;
  55. }
  56.  
  57. function __HoverOffActionButton()
  58. {
  59.   var img = Get("image_" + this.ID);
  60.   img.src = this.Image;
  61. }
  62.  
  63.